package com.gopay.common.order.aop;

import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.core.session.IoSession;

/**
 * 日志客户端Handler
 * 
 * @OrderLogClientHandler.java
 * @author yaobo
 * @2013-4-25 上午10:16:14 www.gopay.com.cn Inc.All rights reserved.
 */
public class OrderLogClientHandler extends IoHandlerAdapter {

    @Override
    public void exceptionCaught(IoSession session, Throwable cause) throws Exception {
        session.close(true);
    }

    @Override
    public void messageReceived(IoSession session, Object message) throws Exception {
        session.close(true);
    }

    @Override
    public void sessionIdle(IoSession session, IdleStatus status) throws Exception {
        session.close(true);
    }

    @Override
    public void sessionClosed(IoSession session) throws Exception {
        session.close(true);
    }

}
